<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<sec:authentication property="principal" var="currentPrincipal" scope="page"/>
  
<div class="block-heading">
  <h5>公司基本信息</h5>
  <c:if test="${supplier.status.editing or supplier.status.rejected or supplier.type.commonStorage}">
    <a href="${ctx.host}/suppliers/${supplier.id}/supplier-info?panel=true" data-target="#edit" data-toggle="modal" title="Edit"
       class="pull-right" style="font-size: 12px; padding-top: 20px;">编辑
    </a>
  </c:if> 
</div>

<div class="form-horizontal ms-form form-personal-info form-supplier-info">

  <div class="form-group ms-form-group">
    <label class="control-label col-xs-3">1&nbsp;<span class="color-red">*</span>公司代码：</label>
    <div class="col-xs-3 pull-left">
        <p class="form-control-static">${supplier.code}</p>
    </div>

    <label class="control-label col-xs-3">2&nbsp;<span class="color-red">*</span>公司现用名(全称)：</label>
    <div class="col-xs-3 pull-left">
        <p class="form-control-static supplier-name">${supplier.name}</p>
    </div>
  </div>
  
  <div class="form-group  ms-form-group">
    <label class="control-label col-xs-3">3.1&nbsp;公司曾用名I(全称)：</label>
    <div class="col-xs-3 pull-left">
      <p class="form-control-static">${empty supplierInfo.formerName ? '无' : supplierInfo.formerName}</p>
    </div>
    <label class="control-label col-xs-3">3.2&nbsp;公司曾用名II(全称)：</label>
    <div class="col-xs-3 pull-left">
      <p class="form-control-static">${empty supplierInfo.secondFormerName ? '无' : supplierInfo.secondFormerName}</p>
    </div>
  </div>
  
  <div class="form-group  ms-form-group">
      <label class="control-label col-xs-3">4&nbsp;<span class="color-red">*</span>董事长：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.chairman ? '无' : supplierInfo.chairman}</p>
      </div>
  </div>

  <div class="form-group  ms-form-group">
      <label class="control-label col-xs-3">5&nbsp;<span class="color-red">*</span>总经理：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.manager ? '无' : supplierInfo.manager}</p>
      </div>
      <label class="control-label col-xs-3">6&nbsp;<span class="color-red">*</span>总经理联系电话：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.managerPhone ? '无' : supplierInfo.managerPhone}</p>
      </div>
  </div>

  <div class="form-group  ms-form-group">
      <label class="control-label col-xs-3">7.1&nbsp;<span class="color-red">*</span>总经理Email&nbsp;I：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.managerEmail ? '无' : supplierInfo.managerEmail}</p>
      </div>
      <label class="control-label col-xs-3">7.2&nbsp;总经理Email&nbsp;II：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.secondManagerEmail ? '无' : supplierInfo.secondManagerEmail}</p>
      </div>
  </div>

  <div class="form-group  ms-form-group">
      <label class="control-label col-xs-3">8&nbsp;<span class="color-red">*</span>公司性质：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.companyProperty ? '无' : supplierInfo.companyDescription}</p>
      </div>
      <label class="control-label col-xs-3">9&nbsp;<span class="color-red">*</span>成立年月：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static"><fmt:formatDate value="${supplierInfo.yearFounded}" pattern="yyyy-MM"/></p>
      </div>
  </div>

  <div class="form-group  ms-form-group">
      <label class="control-label col-xs-3">10&nbsp;<span class="color-red">*</span>注册资金(万元)：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.registerCapital ? '无' : supplierInfo.registerCapital}</p>
      </div>
      <label class="control-label col-xs-3">11&nbsp;<span class="color-red">*</span>注册地：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.registerAddress ? '无' : supplierInfo.registerAddress}</p>
      </div>
  </div>
  
  <div class="form-group  ms-form-group">
    <label class="control-label col-xs-3">12&nbsp;<span class="color-red">*</span>联系地址：</label>
      <div class="col-xs-3 pull-left">
          <p class="form-control-static">${empty supplierInfo.contactAddress ? '无' : supplierInfo.contactAddress}</p>
      </div>

    <label class="control-label col-xs-3">12.1&nbsp;<span class="color-red">*</span>统一社会信用代码：</label>
    <div class="col-xs-3 pull-left">
      <p class="form-control-static">${empty supplierInfo.uniformSocialCreditCode ? '无' : supplierInfo.uniformSocialCreditCode}</p>
    </div>
  </div>
  
  
<%--   <div class="form-group ms-form-group">
    <label class="control-label col-xs-3">13.2&nbsp;<span class="color-red">*</span>体系文件有效期：</label>
    <div class="col-xs-7 pull-left">
      <p class="form-control-static">
        <fmt:formatDate value="${supplierInfo.standardDocumentDate}" pattern="yyyy-MM-dd"/>
      </p>
    </div>
  </div> --%>
  
  <div class="form-group  ms-form-group">
    <label class="control-label col-xs-3">13.1&nbsp;<span class="color-red">*</span>营业执照原件扫描件：</label>
    <div class="col-xs-6 pull-left upload-cover">
        <p class="form-control-static">
          <c:choose>
            <c:when test="${empty supplierInfo.businessLicense and supplierMenuType == 'sub'}">暂未上传</c:when>
            <c:when test="${not empty supplierInfo.businessLicense and supplierMenuType == 'sub'}">
               <a href="${supplierInfo.businessLicense}" target='_BLANK' download="${supplier.name}营业执照原件扫描件">营业执照原件扫描件</a>
               <span>(有效日期：<fmt:formatDate value="${supplierInfo.businessLicenseDate}" pattern="yyyy-MM-dd"/>)</span>
            </c:when>
            <c:when test="${empty supplierInfo.businessLicense and supplierMenuType != 'sub'}">
              暂未上传，点击按钮上传
              <a class="btn ms-btn btn-primary" style="padding: 1px 5px;" href="${ctx.host}/suppliers/${supplier.id}/supplier-info/upload?type=businessLicense&supplierMenuType=${param.supplierMenuType}" data-target="#upload" data-toggle="modal">上传</a>
            </c:when>
            <c:otherwise>
              <a href="${supplierInfo.businessLicense}" target='_BLANK' download="${supplier.name}营业执照原件扫描件">营业执照原件扫描件</a>
              <span>(有效日期：<fmt:formatDate value="${supplierInfo.businessLicenseDate}" pattern="yyyy-MM-dd"/>)</span>
              <c:if test="${supplier.status.description != '合格'}">
                <a class="btn ms-btn btn-primary" style="padding: 1px 5px;" href="${ctx.host}/suppliers/${supplier.id}/supplier-info/upload?type=businessLicense&supplierMenuType=${param.supplierMenuType}" data-target="#upload" data-toggle="modal">重新上传</a>
              </c:if>
            </c:otherwise>
          </c:choose>
        </p>
    </div>
  </div>
  
  <div class="form-group  ms-form-group">
      <label class="control-label col-xs-3">13.2&nbsp;道路运输许可证<span class="color-red">（道路运输公司必填）</span>：</label>
      <div class="col-xs-6 pull-left upload-cover">
          <p class="form-control-static">
            <c:choose>
              <c:when test="${empty supplierInfo.transportCert and supplierMenuType == 'sub'}">暂未上传</c:when>
              <c:when test="${not empty supplierInfo.transportCert and supplierMenuType == 'sub'}">
                 <a href="${supplierInfo.transportCert}" target='_BLANK' download="${supplier.name}道路运输许可证">道路运输许可证</a>
                 <span>(有效日期：<fmt:formatDate value="${supplierInfo.transportCertDate}" pattern="yyyy-MM-dd"/>)</span>
              </c:when>
              <c:when test="${empty supplierInfo.transportCert and supplierMenuType != 'sub'}">
                暂未上传，点击按钮上传
                <a class="btn ms-btn btn-primary" style="padding: 1px 5px;" href="${ctx.host}/suppliers/${supplier.id}/supplier-info/upload?type=transportCert&supplierMenuType=${param.supplierMenuType}" data-target="#upload" data-toggle="modal">上传</a>
              </c:when>
              <c:otherwise>
                <a href="${supplierInfo.transportCert}" target='_BLANK' download="${supplier.name}道路运输许可证">道路运输许可证</a>
                <span>(有效日期：<fmt:formatDate value="${supplierInfo.transportCertDate}" pattern="yyyy-MM-dd"/>)</span>
                <a class="btn ms-btn btn-primary" style="padding: 1px 5px;" href="${ctx.host}/suppliers/${supplier.id}/supplier-info/upload?type=transportCert&supplierMenuType=${param.supplierMenuType}" data-target="#upload" data-toggle="modal">重新上传</a>
              </c:otherwise>
            </c:choose>
          </p>
      </div>
  </div>

  <div class="form-group  ms-form-group">
      <label class="control-label col-xs-3">14.1&nbsp;质量体系认证证书原件扫描件：</label>
      <div class="col-xs-6 pull-left upload-cover">
          <p class="form-control-static">
            <c:choose>
              <c:when test="${empty supplierInfo.qualitySystem and supplierMenuType == 'sub'}">暂未上传</c:when>
              <c:when test="${not empty supplierInfo.qualitySystem and supplierMenuType == 'sub'}">
                 <a href="${supplierInfo.qualitySystem}" target='_BLANK' download="${supplier.name}质量体系认证证书原件扫描件">质量体系认证证书原件扫描件</a>
                 <span>(有效日期：<fmt:formatDate value="${supplierInfo.standardDocumentDate}" pattern="yyyy-MM-dd"/>)</span>
              </c:when>
              <c:when test="${empty supplierInfo.qualitySystem and supplierMenuType != 'sub'}">
                暂未上传，点击按钮上传
                <a class="btn ms-btn btn-primary" style="padding: 1px 5px;" href="${ctx.host}/suppliers/${supplier.id}/supplier-info/upload?type=qualitySystem&supplierMenuType=${param.supplierMenuType}" data-target="#upload" data-toggle="modal">上传</a>
              </c:when>
              <c:otherwise>
                <a href="${supplierInfo.qualitySystem}" target='_BLANK' download="${supplier.name}质量体系认证证书原件扫描件">质量体系认证证书原件扫描件</a>
                <span>(有效日期：<fmt:formatDate value="${supplierInfo.standardDocumentDate}" pattern="yyyy-MM-dd"/>)</span>
                <a class="btn ms-btn btn-primary" style="padding: 1px 5px;" href="${ctx.host}/suppliers/${supplier.id}/supplier-info/upload?type=qualitySystem&supplierMenuType=${param.supplierMenuType}" data-target="#upload" data-toggle="modal">重新上传</a>
              </c:otherwise>
            </c:choose>
          </p>
      </div>
  </div>
  
  <div class="form-group ms-form-group">
    <label class="control-label col-xs-3">14.2&nbsp;<span class="color-red">*</span>体系文件：</label>
    <div class="col-xs-9 pull-left">
      <p class="form-control-static">${empty supplierInfo.standardDocument ? '' : supplierInfo.standardDocumentString}</p>
    </div>
  </div>
  
  <div class="form-group  ms-form-group">
      <label class="control-label col-xs-3 ">14.3&nbsp;<span class="color-red">*</span>办公及停车场地租房/购房合同扫描件：</label>
      <div class="col-xs-6 pull-left upload-cover">
          <p class="form-control-static">
            <c:choose>
              <c:when test="${empty supplierInfo.leaseContract and supplierMenuType == 'sub'}">暂未上传</c:when>
              <c:when test="${not empty supplierInfo.leaseContract and supplierMenuType == 'sub'}">
                 <a href="${supplierInfo.leaseContract}" target='_BLANK' download="${supplier.name}办公及停车场地租房/购房合同扫描件">办公及停车场地租房/购房合同扫描件</a>
                 <span>(有效日期：<fmt:formatDate value="${supplierInfo.leaseContractDate}" pattern="yyyy-MM-dd"/>)</span>
              </c:when>
              <c:when test="${empty supplierInfo.leaseContract and supplierMenuType != 'sub'}">
                暂未上传，点击按钮上传
                <a class="btn ms-btn btn-primary" style="padding: 1px 5px;" href="${ctx.host}/suppliers/${supplier.id}/supplier-info/upload?type=leaseContract&supplierMenuType=${param.supplierMenuType}" data-target="#upload" data-toggle="modal">上传</a>
              </c:when>
              <c:otherwise>
                <a href="${supplierInfo.leaseContract}" target='_BLANK' download="${supplier.name}办公及停车场地租房/购房合同扫描件">办公及停车场地租房/购房合同扫描件</a>
                <span>(有效日期：<fmt:formatDate value="${supplierInfo.leaseContractDate}" pattern="yyyy-MM-dd"/>)</span>
                <a class="btn ms-btn btn-primary" style="padding: 1px 5px;" href="${ctx.host}/suppliers/${supplier.id}/supplier-info/upload?type=leaseContract&supplierMenuType=${param.supplierMenuType}" data-target="#upload" data-toggle="modal">重新上传</a>
              </c:otherwise>
            </c:choose>
          </p>
          
      </div>
  </div>
  
    
</div>